#ifndef OBJECT_WORLD_H
#define OBJECT_WORLD_H

#include "object_screen.h"
#include "../affiliate/collider.h"

class ObjectWorld : public ObjectScreen {
protected:
    glm::vec2 position_ = glm::vec2(0); // 位置
    Collider *collider_ = nullptr;

public:
    void init() override { type_ = ObjectType::OBJECT_WORLD; } // 初始化函数
    void update(float dt) override;

    glm::vec2 getPosition() const override { return position_; } // 获取位置
    void setPosition(const glm::vec2 &position);

    void setRenderPos(const glm::vec2 &render_pos) override;

    void setCollider(Collider *collider) { collider_ = collider; }
    Collider *getCollider() const { return collider_; }
    virtual void takeDamage(float damage) { return; }
};

#endif // OBJECT_WORLD_H
